
package com.mercury.security.annotation;

import com.mercury.security.config.AuthResourceServerAutoConfiguration;
import com.mercury.security.config.AuthResourceServerTokenRelayAutoConfiguration;
import com.mercury.security.config.AuthSecurityBeanDefinitionRegistrar;
import com.mercury.security.config.AuthTokenStoreAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.*;

/**
 * @author mercury
 * <p>
 * 资源服务注解 需要鉴权的服务
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({AuthResourceServerAutoConfiguration.class,
        AuthSecurityBeanDefinitionRegistrar.class,
        AuthTokenStoreAutoConfiguration.class,
        AuthResourceServerTokenRelayAutoConfiguration.class})
public @interface EnableAuthResourceServer {


}
